import request from '@/utlis/request'

// 添加报废记录
export function addDisposal(data) {
  return request({
    url: '/disposals/add',
    method: 'post',
    data
  })
}

// 获取报废记录列表
export function getDisposalList() {
  return request({
    url: '/disposals/list',
    method: 'get'
  })
}

// 更新报废记录
export function updateDisposal(data) {
  return request({
    url: '/disposals/update',
    method: 'put',
    data
  })
}

// 删除报废记录
export function deleteDisposal(id) {
  return request({
    url: `/disposals/delete/${id}`,
    method: 'delete'
  })
}

// 获取单个报废记录
export function getDisposal(id) {
  return request({
    url: `/disposals/get/${id}`,
    method: 'get'
  })
}
